package com.learn.config;

import com.learn.beans.DemoBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 10:46 2018-11-13
 * @Modify by:
 */
@Configuration
public class ProfileConfig {

  @Bean
  @Profile("dev")
  public DemoBean devDemoBean(){
    return new DemoBean("dev 环境。。。");
  }

  @Bean
  @Profile("pro")
  public DemoBean proDemoBean(){
    return new DemoBean("pro 环境。。。");
  }
}
